#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2018/5/3 0003 12:21
# @Author  : Arliki
# @File    : paper.py

import redis, re


def run():
    r = redis.Redis(host='localhost', port=6379, password='5tgbnhy67ujm', db=1)
    if r:
        for x in range(0, 37):
            r.lpush('onepiece:chapter', str(x) + "卷(合集)")
        print("37 ok")
        for x in range(137, 903):
            r.lpush('onepiece:chapter', x)
        print("137 ok")
    a = "fzdm.com/manhua/02/457/index_26.html"
    print(re.search('\/(\d*)\/index', a).group(1))


if __name__ == '__main__':
    run()
